import { lazy } from "react";
import { createBrowserRouter } from "react-router-dom";
const Home=lazy(()=>import("../Page/Home"))
const List=lazy(()=>import("../Page/List"))
const Message=lazy(()=>import("../Page/Message"))
const MainLayout=lazy(()=>import('../Page/MainLayout'))
const Login=lazy(()=>import('../Page/Login'))

const routes=createBrowserRouter([

    {
        path:'/',
        element:<MainLayout/>,
        children:[
            {
                path:'/',
                element:<Home/>
            },
            {
                path:'/list',
                element:<List/>
            },
            {
                path:'/message',
                element:<Message/>
            }
        ]
    },
    {
        path:'/login',
        element:<Login/>
    }
])
export default routes